]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
meson: Avoid glibc-specifics when not using glibc
authorDaniel van Vugt <daniel.van.vugt@canonical.com>
Thu, 12 Jun 2025 05:34:29 +0000 (13:34 +0800)
committerMarge Bot <marge-bot@gnome.org>
Wed, 18 Jun 2025 21:47:14 +0000 (21:47 +0000)
This also requires Meson 1.3 to use compiler.has_define.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8457
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3748>

meson.build

index a3ac8509a73ab6ff8ed6a18a136c0846dda3a27c..b4cfa76ffd657da25df69023ef2f7b6c5ed14c5d 100644 (file)
@@ -1,6 +1,6 @@
 project('gnome-shell', 'c',
   version: '49.alpha.0',
-  meson_version: '>= 1.1.0',
+  meson_version: '>= 1.3.0',
   license: 'GPL-2.0-or-later',
 )
 
@@ -164,7 +164,10 @@ cdata.set('HAVE_MALLINFO', cc.has_function('mallinfo'))
 cdata.set('HAVE_MALLINFO2', cc.has_function('mallinfo2'))
 cdata.set('HAVE_SYS_RESOURCE_H', cc.has_header('sys/resource.h'))
 cdata.set('HAVE_EXE_INTROSPECTION',
-  cc.has_header('elf.h') and cc.has_header('link.h'))
+  cc.has_header('elf.h') and
+  cc.has_header('link.h') and
+  cc.has_define('__GLIBC__', prefix: '#include <link.h>')
+)
 cdata.set('HAVE__NL_TIME_FIRST_WEEKDAY',
   cc.has_header_symbol('langinfo.h', '_NL_TIME_FIRST_WEEKDAY')
 )